<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <title>护士信息</title>
    <link rel="stylesheet" href="css/bootstrap.css">
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/bootstrap.js" type="text/javascript"></script>
    <script src="js/jsrender.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function(){
            if(localStorage.getItem("token")==null){
                window.location.href="login.html"
            }
            $("form").submit(function(){
                $.ajax({
                    url: GC.bctx + "medicationrecord/insert",
                    type:"POST",
                    data:$("form").serialize(),
                    headers: {"Authorization": localStorage.getItem("token")},
                    success:function(r){
                        if(r.successed){
                            //修改成功，转向显示所有部门页面
                            alert(r.message)
                            window.location.href="medicationrecords.html"
                        }else{
                            //修改失败，显示失败信息
                            alert(r.message)
                        }

                    }
                })
                return false
            })
        })
    </script>
</head>
<body>
<div class="container-fluid">
    <h1>护士信息</h1>
    <hr/>
    <form>
        <table>
            <tr class="d-none">
                <td >用药记录编号</td>
                <td><input id="medicationrecordid" name="medicationrecordid" type="text"/></td>
                <td><span class="c-r">*</span></td>
            </tr>
            <tr>
                <td>客户id</td>
                <td><input id="customerid" name="customerid"  type="text"/></td>
                <td><span class="c-r">*</span></td>
            </tr>
            <tr>
                <td>药名：</td>
                <td><input id="medicationrecorddrugname" name="medicationrecorddrugname" type="text"/></td>
            </tr>
            <tr >
                <td >药物剂量：</td>
                <td><input id="medicationrecorddosage" name="medicationrecorddosage" type="text"/></td>
            </tr>
            <tr>
                <td>用药方法：</td>
                <td><input id="medicationrecordmethod" name="medicationrecordmethod" type="text"/></td>
            </tr>

            <tr>
                <td>送药：</td>
                <td><input id="medicationrecordshipper" name="medicationrecordshipper" type="text"/></td>
            </tr>
            <tr>
                <td>配药：</td>
                <td><input id="medicationrecorddispenser" name="medicationrecorddispenser" type="text"/></td>
            </tr>
            <tr>
                <td colspan="3" class="text-center">
                    <input type="submit" value="新建"/>
                    <input type="reset" value="重置"/>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>